import loader from '@logic/loader'
import {modRequire,modDefine} from '@logic/globalApi/amd'

class GlobalApi{
    constructor(){

    }
    init(){
        global.App = (moduleInfo)=>{
            loader.createAppModule(moduleInfo)
        }

        global.modRequire=modRequire;
        global.modDefine=modDefine;

        global.Page = (moduleInfo,compileInfo)=>{
            
            loader.createPageModule(moduleInfo,compileInfo)
        }
    }
}
export default new GlobalApi()